Repository navigation
DEV-1291: Android HIL counts inStream's replies over BLE too - #139
Merged
Merged
Conversation
inStream counts the battery and status replies it gets from the log, by the
lines Android's own Classic parser writes ("IN STREAM: VBATT_RESPONSE").
Over BLE the driver's parser runs instead, and it words them
"In-stream received = [0x94] VBATT_RESPONSE", so every BLE run reported 0
replies to 15 reads and failed, although the driver logged all of them. It
now counts each transport's own line.
With that, inStream over BLE on a Shimmer3R decoded 15 of 15 battery and 15
of 15 status replies, with no command timeout or parser error, on driver
0.11.9_beta (without DEV-1291's fix) and 0.11.11_beta alike: over BLE the
reads are queued, so no reply lands in the pause after a logging stop.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test code only.
inStreammiscounted replies over BLE, so it failed on every BLE run.The bug
inStreamcounts the battery and status replies it gets from the phone's log, by the line Android's own Classic parser writes, such asIN STREAM: VBATT_RESPONSE. Over BLE the driver's parser runs instead, and it words themIn-stream received = [0x94] VBATT_RESPONSE. So every BLE run reported 0 replies to 15 reads and failed, although the driver logged all of them. It now counts each transport's own line.Tested
s3r-2f31 (Shimmer3R, LogAndStream v1.1.22) over BLE, from an M2101K6G phone on Android 11, at the default 2-byte CRC:
Before this change, both runs reported 0 of 15 replies.
So DEV-1291, an ACK arriving in the pause after a logging stop, doesn't happen over BLE. There the driver queues these reads, and none was answered in a pause.
Both runs still fail on a timestamp that doesn't increase after an SD logging start while streaming. That's the Shimmer3R firmware's DEV-1245, which v1.1.22 was meant to fix. It isn't caused by this change.
🤖 Generated with Claude Code